import http from '@/utils/http.js'
// 答疑问题搜索
export function getSearchQuestions(params) {
  return http.get('/wxpub/solution_center/search_questions', params)
}

// 官网最新问答列表
export function getPublishQuestions(params) {
  return http.get('/wxpub/solution_center/publish_questions', params)
}

// 获取答疑的问题列表
export function getQuestionList(params) {
  return http.get('/wxpub/solution_center/show_questions', params)
}
// 获取我的问题列表
export function getMyQuestionList(params) {
  return http.get('/wxpub/solution_center/user_questions', params)
}

//获取搜索内容列表
export function getSearchQuestionList(params) {
  return http.post('/wxpub/solution/search_keyword_question', params)
}

// 获取专业、及对应的科目
export function getProfessions(params) {
  return http.get('/wxpub/solution/solution_profession', params)
}

//获取用户搜索记录
export function getHotSearch(params) {
  return http.get('/wxpub/solution/user_keywords_history', params)
}

//清楚用户搜索记录
export function deleteHotSearch(params) {
  return http.post('/wxpub/solution/clear_keywords_history', params)
}

//获取答疑配置信息
export function getConfigInfo(params) {
  return http.get('wxpub/solution/service_packagev2', params)
}

//提交问题
export function submitQuestion(params) {
  if (params) params.from = 'web'
  return http.post('/wxpub/solution_center/submit_question', params)
}

//追问
export function continueQuestion(params) {
  return http.post('/wxpub/solution_center/continue_question', params)
}

// 帖子问题详情
export function getQuestionDetail(params) {
  return http.get('/wxpub/solution_center/posts_info', params)
}

//点赞和收藏
export function thumbAndCollect(params) {
  return http.post('/wxpub/solution/solution_question_thumb', params)
}

//用户评价
export function evaluateQuestion(params) {
  return http.post('/wxpub/solution_center/user_evaluate', params)
}

//上传图片
export function uploadImg(params) {
  return http.post('/wxpub/solution/upload_img', params)
}

//获取当前提问状态
export function getSolutionStatus(params) {
  return http.get('/wxpub/solution/check_solution_service', params)
}

//获取答疑加量包商品、已买次数包
export function getAnswerPackage(params) {
  return http.get('/wxpub/api/question_goods', params)
}

//获取答疑课程权限、加量包权限
// export function getAnswerCoursePackage(params) {
//   return http.get('/wxpub/solution/service_package', params)
// }

//获取推荐的答疑权限商品
export function getAnswerPowerProduct(params) {
  return http.get('/wxpub/api/dayi_goods', params)
}

//获取IM详情
export function getImDetail(params) {
  return http.get('wxpub/solution/solution_im_history_new', params)
}
//获取图书详情
export function getBookInfo(params) {
  return http.get('wxpub/solution_center/book_list', params)
}
// 删除搜索记录
export function clearKeywordsHistory(params) {
  return http.post('/wxpub/solution/clear_keywords_history', params)
}
// 获取当前课程或题目的答疑问题列表
export function getTabQuestionList(params) {
  return http.get('wxpub/solution_center/solution_course_exam', params)
}

